'use strict';

define(['angular', 'services'], function(angular, services) {

    // 构造指令模块
    function DirectiveModule(name, dependencies) {
        var module = angular.module(name, dependencies);
        module.config(['$compileProvider', function ($compileProvider) {
            module.register = function(name, directiveFactory) {
                return $compileProvider.directive(name, directiveFactory);
            }
        }]);
        return module;
    }

    return {
        common : new DirectiveModule('app.common.directives', ['app.common.services'])
    };
});